﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CCH.Entity;
using CCH.DAO;
using CCH.Lib;

public partial class _1003_1 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            int res_no = int.Parse(Request.QueryString["res_no"]);

            research data = new researchDAO().Get_research(res_no);

            this.lab_abs.Text = data.res_abstract.ConverToCN();
            this.lab_author.Text = data.res_author.ConverToCN();
            this.lab_date.Text = data.res_datetime.Value.ToLongDateString().ConverToCN();
            this.lab_public.Text = data.res_public.ConverToCN();
            this.lab_title.Text = data.res_title.ConverToCN();
            this.lab_type.Text = this.Get_type(data.res_type.Value).ConverToCN();

            this.HyperLink1.Text = data.file_name.ConverToCN();
            this.HyperLink1.NavigateUrl = "researchFile.ashx?res_no=" + res_no;
        }
    }

    protected String Get_type(int res_type)
    {
        if (res_type == 1) { return "骨質疏鬆"; }
        if (res_type == 2) { return "甲狀腺"; }
        if (res_type == 3) { return "糖尿病"; }

        return "";
    }
}